def jiecheng(n):
    if n == 0:
        return 1
    elif n == 1:
        return 1
    else:
        return n * jiecheng(n-1)
#解法1
# a = []
# for i in range(6):
#     a.append(jiecheng(i))
# print(sum(a))
#解法2
# s = 0
# for i in range(6):
#     s += jiecheng(i)
# print(s)